The ability to quickly and efficiently process video streams has grown in importance, with portable consumer electronic products incorporating more and more multimedia features. Mobile phones, for example, can be used to retrieve, view and transmit multimedia content. However, while the capabilities of portable devices continue to increase, such devices are still somewhat limited relative to more powerful platforms such as personal computers. Data transmission and retrieval rates may also be a factor. The amount of image (e.g., video) data is usually more of a consideration than the amount of audio data.
The data is often encoded (compressed) to facilitate storage and streaming, and then decoded (decompressed) for playback (e.g., display). Video data may be compressed using a Moving Pictures Experts Group (MPEG) scheme, for example. In a compression scheme such as MPEG, the raw or original data is encoded as motion vectors, discrete cosine transform (DCT) coefficients, texture coefficients, and so on. Methods such as Huffman coding are applied to the encoded data to transform the encoded values into predefined variable length codes (VLCs), which are then serialized in a bitstream. An N-bit encoded value can be represented as an M-bit VLC, where M is less than N, thus shortening the length of the bitstream. Shorter VLCs are used to represent the values that occur most frequently in the encoded data to further reduce the length of the bitstream.
The VLCs are not separated or otherwise delineated in the encoded bitstream, but are defined in such a way that they can be unambiguously decoded using a variable length decoder (VLD). Typically, to interpret the encoded bitstream, the VLD relies on a table of VLCs implemented as a lookup table (LUT). In general, the VLD parses the encoded bitstream to identify a VLC that is in the LUT, and then shifts the input bitstream by the length of the VLC to identify the next VLC. More specifically, in essence the VLD looks at the first bit in the bitstream to see if it matches an entry in the LUT; if not, it looks at the first two bits to see if they match an LUT entry; and so on, until a match is made. Having thus interpreted a certain number of bits, the VLD can then shift the bitstream by that number of bits and repeat the process.
There are advantages associated with improving the performance of a VLD. For instance, by accelerating VLD performance, processing speeds can be increased, perhaps improving video quality. Alternatively, with a faster VLD, current levels of performance can be maintained using fewer processor cycles, perhaps saving power or allowing additional applications to be executed simultaneously.